<template>
	<view class="button-list e-flex e-flex-end">
		<button class="button-white e-m-r-20" v-if="info.state === 1">{{ $t('order.查看券码') }}</button>
		<button
			class="button-white e-m-r-20"
			v-if="info.state === 2 && isDetail"
			@tap.stop="$goTo('/pages/order/reservation/comment', { id: info.id, goodsId: info.serviceId })"
		>
			{{ $t('order.评价') }}
		</button>
	</view>
</template>

<script>
import { mapState } from 'vuex';
export default {
	// #ifdef MP-WEIXIN
	// 将自定义节点设置成虚拟的，更加接近Vue组件的表现
	options: {
		virtualHost: true
	},
	// #endif
	props: {
		info: Object,
		type: {
			type: String,
			default: 'order'
		},
		isDetail: Boolean
	}
};
</script>

<style lang="scss" scoped>
.button-list {
	padding: 20rpx 30rpx;
	button {
		width: 172rpx;
		height: 60rpx;
		line-height: 60rpx;
		font-size: 30rpx;
		border-radius: 30rpx;
		background: var(--color-primary);
		color: #fff;
		margin: 0;
		padding: 0;
	}
	.button-white {
		border: 1px solid #b4b4b4;
		color: #353535;
		background: #fff;
	}
}
</style>
